<template>
  <div class="app-container">
    <component :is="currentRole" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import Admin from './admin'
import Teacher from './teacher'
import Student from './student'

export default {
  name: 'Dashboard',
  components: { Admin, Teacher, Student },
  
  data() {
    return {
      currentRole: 'Student'
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'role'
    ])
  },
  created() {
    this.currentRole = this.role
  }
}
</script>

<style lang="scss" scoped>
.app-container {
  // background-color: rgb(240, 242, 245);
}
</style>
